@extends('admin.main')
@section('content')
    <div class="admin-content">
        <div class="am-cf am-padding am-padding-bottom-0">
            <div class="am-fl am-cf">
                <strong class="am-text-primary am-text-lg">后台设置</strong>
                /
                <small>员工信息</small>
            </div>
        </div>
        <hr>
        <div class="am-g">
            @include('admin.layouts.adminInfo')
            <div class="am-u-sm-12 am-u-md-8 am-u-md-pull-4">
                <dd style="padding:5px 10px;padding-top:10px;
                    border:1px solid #f0f0f0;box-shadow:0 0 10px #e0e0e0;
                    background:#fefefe;
                    position:fixed;top:150px;right:50px;">
                    <dl>
                        <a href="#eduBg">教育背景</a>
                    </dl>
                    <dl>
                        <a href="#workHistory">工作经历</a>
                    </dl>
                    <dl>
                        <a href="#family">家庭成员</a>
                    </dl>
                    <dl>
                        <a href="#comment">个人评价</a>
                    </dl>
                    <dl>
                        <a href="#willFac">工厂意向</a>
                    </dl>
                    <dl>
                        <a href="#willCom">公司意向</a>
                    </dl>
                    <dl>
                        <a href="#file">员工认证</a>
                    </dl>
                </dd>
                <input type="hidden" id="uid" value="{{$uid}}">
                <table class="am-table am-table-striped
                    am-table-hover table-main">
                    <tbody id="tbody-alert">
                    {{--教育背景--}}
                    <tr>
                        <td colspan="2" id="eduBg">
                            <h2>
                                教育背景：
                                <a href="javascript:;"
                                   onclick="addEdu()">新增</a>
                            </h2>
                        </td>
                    </tr>
                    @if($eduBgs && isset($eduBgs['eduBgCount']))
                    @for($i=0;$i<$eduBgs['eduBgCount'];$i++)
                    <tr>
                        <td width="100">
                            序号{{$i+1}}：
                            <br>
                            <a href="javascript:;"
                               onclick="modifyEdu({{$i+1}})">编辑</a>
                        </td>
                        <td width="500">
                            起始时间：{{$eduBgs['eduBgStart'][$i+1]}}
                            <br>
                            结束时间：{{$eduBgs['eduBgEnd'][$i+1]}}
                            <br>
                            毕业学校：{{$eduBgs['eduBgSchool'][$i+1]}}
                            <br>
                            所学专业：{{$eduBgs['eduBgMajor'][$i+1]}}
                            <br>
                            所获奖项：{{$eduBgs['eduBgAward'][$i+1]}}
                            <input type="hidden" id="eduBgStart{{$i+1}}" value="{{$eduBgs['eduBgStart'][$i+1]}}">
                            <input type="hidden" id="eduBgEnd{{$i+1}}" value="{{$eduBgs['eduBgEnd'][$i+1]}}">
                            <input type="hidden" id="eduBgSchool{{$i+1}}" value="{{$eduBgs['eduBgSchool'][$i+1]}}">
                            <input type="hidden" id="eduBgMajor{{$i+1}}" value="{{$eduBgs['eduBgMajor'][$i+1]}}">
                            <input type="hidden" id="eduBgAward{{$i+1}}" value="{{$eduBgs['eduBgAward'][$i+1]}}">
                        </td>
                    </tr>
                    @endfor
                    @endif
                    <tr>
                        <td colspan="2"><hr></td>
                    </tr>
                    {{--工作经历--}}
                    <tr>
                        <td colspan="2" id="workHistory">
                            <h2>
                                工作经历：
                                <a href="javascript:;"
                                   onclick="addWork()">新增</a>
                            </h2>
                        </td>
                    </tr>
                    @if($workHistorys && isset($workHistorys['workCount']))
                    @for($i=0;$i<$workHistorys['workCount'];$i++)
                    <tr>
                        <td>
                            序号{{$i+1}}：
                            <br>
                            <a href="javascript:;"
                               onclick="modifyWork({{$i+1}})">编辑</a>
                        </td>
                        <td>
                            起始时间：
                            {{$workHistorys['workStart'][$i+1]}}
                            <br>
                            结束时间：
                            {{$workHistorys['workEnd'][$i+1]}}
                            <br>
                            公司名称：
                            {{$workHistorys['workComName'][$i+1]}}
                            <br>
                            所在岗位：
                            {{$workHistorys['workJob'][$i+1]}}
                            <br>
                            离职时间：
                            {{$workHistorys['workLeave'][$i+1]}}
                            <input type="hidden" id="workStart{{$i+1}}" value="{{$workHistorys['workStart'][$i+1]}}">
                            <input type="hidden" id="workEnd{{$i+1}}" value="{{$workHistorys['workEnd'][$i+1]}}">
                            <input type="hidden" id="workComName{{$i+1}}" value="{{$workHistorys['workComName'][$i+1]}}">
                            <input type="hidden" id="workJob{{$i+1}}" value="{{$workHistorys['workJob'][$i+1]}}">
                            <input type="hidden" id="workLeave{{$i+1}}" value="{{$workHistorys['workLeave'][$i+1]}}">
                        </td>
                    </tr>
                    @endfor
                    @endif
                    <tr>
                        <td colspan="2"><hr></td>
                    </tr>
                    {{--家庭成员--}}
                    <tr>
                        <td colspan="2" id="family">
                            <h2>
                                家庭成员：
                                <a href="javascript:;"
                                   onclick="addFamily()">新增</a>
                            </h2>
                        </td>
                    </tr>
                    @if($familys && isset($familys['familyCount']))
                    @for($i=0;$i<$familys['familyCount']-1;$i++)
                    <tr>
                        <td>
                            序号{{$i+1}}：
                            <br>
                            <a href="javascript:;"
                               onclick="modifyFamily({{$i+1}})">编辑</a>
                        </td>
                        <td>
                            成员姓名：
                            {{$familys['familyName'][$i+1]}}
                            <br>
                            与你称谓：
                            {{$familys['familyCall'][$i+1]}}
                            <br>
                            所在公司：
                            {{$familys['familyCom'][$i+1]}}
                            <br>
                            联系方式：
                            {{$familys['familyContact'][$i+1]}}
                            <input type="hidden" id="familyName{{$i+1}}" value="{{$familys['familyName'][$i+1]}}">
                            <input type="hidden" id="familyCall{{$i+1}}" value="{{$familys['familyCall'][$i+1]}}">
                            <input type="hidden" id="familyCom{{$i+1}}" value="{{$familys['familyCom'][$i+1]}}">
                            <input type="hidden" id="familyContact{{$i+1}}" value="{{$familys['familyContact'][$i+1]}}">
                        </td>
                    </tr>
                    @endfor
                    @endif
                    <tr>
                        <td colspan="2"><hr></td>
                    </tr>
                    {{--个人评价--}}
                    <tr>
                        <td colspan="2" id="comment">
                            <h2>
                                个人评价：
                                <a href="javascript:;"
                                   onclick="modifyComment()">编辑</a>
                            </h2>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" width="600">
                            个人优势：
                            <p>{{(isset($comments['comFeature'])&&$comments['comFeature'])?$comments['comFeature']:''}}</p>
                            擅长技能：
                            <p>{{(isset($comments['comSkill'])&&$comments['comSkill'])?$comments['comSkill']:''}}</p>
                            兴趣爱好：
                            <p>{{(isset($comments['comHobby'])&&$comments['comHobby'])?$comments['comHobby']:''}}</p>
                            对企业期待：
                            <p>{{(isset($comments['comExpect'])&&$comments['comExpect'])?$comments['comExpect']:''}}</p>
                            业务需求：
                            <p>{{(isset($comments['businessRadioInput'])&&$comments['businessRadioInput'])?$comments['businessRadioInput']:''}}</p>
                            技术等级
                            <p>{{(isset($comments['skillRadioInput'])&&$comments['skillRadioInput'])?$comments['skillRadioInput']:''}}</p>
                            <input type="hidden" id="comFeature" value="{{(isset($comments['comFeature'])&&$comments['comFeature'])?$comments['comFeature']:''}}">
                            <input type="hidden" id="comSkill" value="{{(isset($comments['comSkill'])&&$comments['comSkill'])?$comments['comSkill']:''}}">
                            <input type="hidden" id="comHobby" value="{{(isset($comments['comHobby'])&&$comments['comHobby'])?$comments['comHobby']:''}}">
                            <input type="hidden" id="comExpect" value="{{(isset($comments['comExpect'])&&$comments['comExpect'])?$comments['comExpect']:''}}">
                            <input type="hidden" id="businessRadioInput" value="{{(isset($comments['businessRadioInput'])&&$comments['businessRadioInput'])?$comments['businessRadioInput']:''}}">
                            <input type="hidden" id="skillRadioInput" value="{{(isset($comments['skillRadioInput'])&&$comments['skillRadioInput'])?$comments['skillRadioInput']:''}}">
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2"><hr></td>
                    </tr>
                    {{--工厂求职意向--}}
                    <tr>
                        <td colspan="2" id="willFac">
                            <h2>
                                工厂求职意向(工厂员工有效)：
                                <a href="javascript:;"
                                   onclick="modifyFacWill()">编辑</a>
                            </h2>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" width="600">
                            <b>面料种类：</b>
                            @if(isset($willFacs['fabricType']) && $willFacs['fabricType'])
                            @foreach($willFacs['fabricType'] as  $fabric)
                                @if($fabric['id'])
                                {{$fabric['name']}} &nbsp; &nbsp;
                                @endif
                            @endforeach
                            @endif
                            <br>
                            <b>技术等级：</b>
                            @if(isset($willFacs['techLevel']) && $willFacs['techLevel'])
                            {{$willFacs['techLevel'] ? $willFacs['techLevel']['name'] : ''}}
                            @endif
                            <br>
                            <b>擅长技能：</b>
                            @if(isset($willFacs['skill']) && $willFacs['skill'])
                            @foreach($willFacs['skill'] as  $skill)
                                @if($skill['id'])
                                {{$skill['name']}} &nbsp; &nbsp;
                                @endif
                            @endforeach
                            @endif
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2"><hr></td>
                    </tr>
                    {{--公司求职意向--}}
                    <tr>
                        <td colspan="2" id="willCom">
                            <h2>
                                公司求职意向(公司员工有效)：
                                <a href="javascript:;"
                                   onclick="modifyComWill()">编辑</a>
                            </h2>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" width="600">
                            <b>工作地点：</b>
                            {{$willComs['address']}}
                            <br>
                            <b>职能：</b>
                            {{$willComs['jobModule']}}
                            <br>
                            <b>职位：</b>
                            {{$willComs['job']}}
                            <br>
                            <b>薪资：</b>
                            {{$willComs['salary']}}
                            <br>
                            <b>工作类型：</b>
                            {{$willComs['workType']}}
                            <br>
                            <b>所属行业：</b>
                            {{$willComs['industry']}}
                            <br>
                            <b>到岗时间：</b>
                            {{$willComs['jobTime']}}
                            <br>
                            <b>个人标签：</b>
                            {{--{{$willComs['tags']?implode('  ',$willComs['tags']):''}}--}}
                            {{--{{dd($willComs['tags'])}}--}}
                            {{$willComs['tags']}}
                            <input type="hidden" id="address" value="{{$willComs['address']}}">
                        </td>
                    </tr>
                    {{--员工认证--}}
                    <tr>
                        <td colspan="2" id="file">
                            <h2>员工认证：</h2>
                        </td>
                    </tr>
                    <tr>
                        <td width="100">
                            <b>本人照片：</b>
                            <br>
                            <a href="javascript:;" onclick="modifyFile(1)">新增</a>
                        </td>
                        <td width="500">
                            @if(isset($files['selfs']) && $files['selfs'])
                                @foreach($files['selfs'] as $self)
                                    @if(file_exists(ltrim($self,'/')))
                                        <div style="margin:5px;float:left;">
                                            <img src="{{$self}}" height="100">
                                        </div>
                                    @endif
                                @endforeach
                            @endif
                        </td>
                    </tr>
                    <tr>
                        <td width="100">
                            <b>身份证照片：</b>
                            <br>
                            <a href="javascript:;" onclick="modifyFile(2)">新增</a>
                        </td>
                        <td width="500">
                            @if(isset($files['idcards']) && $files['idcards'])
                                @foreach($files['idcards'] as $idcard)
                                    @if(file_exists(ltrim($idcard,'/')))
                                        <div style="margin:5px;float:left;">
                                            <img src="{{$idcard}}" height="100">
                                        </div>
                                    @endif
                                @endforeach
                            @endif
                        </td>
                    </tr>
                    <tr>
                        <td width="100">
                            <b>毕业证：</b>
                            <br>
                            <a href="javascript:;" onclick="modifyFile(3)">新增</a>
                        </td>
                        <td width="500">
                            @if(isset($files['byzs']) && $files['byzs'])
                                @foreach($files['byzs'] as $byz)
                                    @if(file_exists(ltrim($byz,'/')))
                                        <div style="margin:5px;float:left;">
                                            <img src="{{$byz}}" height="100">
                                        </div>
                                    @endif
                                @endforeach
                            @endif
                        </td>
                    </tr>
                    <tr>
                        <td width="100">
                            <b>奖状：</b>
                            <br>
                            <a href="javascript:;" onclick="modifyFile(4)">新增</a>
                        </td>
                        <td width="500">
                            @if(isset($files['awards']) && $files['awards'])
                                @foreach($files['awards'] as $award)
                                    @if(file_exists(ltrim($award,'/')))
                                        <div style="margin:5px;float:left;">
                                            <img src="{{$award}}" height="100">
                                        </div>
                                    @endif
                                @endforeach
                            @endif
                        </td>
                    </tr>
                    <tr>
                        <td width="100">
                            <b>结婚证：</b>
                            <br>
                            <a href="javascript:;" onclick="modifyFile(5)">新增</a>
                        </td>
                        <td width="500">
                            @if(isset($files['marrys']) && $files['marrys'])
                                @foreach($files['marrys'] as $marry)
                                    @if(file_exists(ltrim($marry,'/')))
                                        <div style="margin:5px;float:left;">
                                            <img src="{{$marry}}" height="100">
                                        </div>
                                    @endif
                                @endforeach
                            @endif
                        </td>
                    </tr>
                    <tr>
                        <td width="100">
                            <b>驾驶证：</b>
                            <br>
                            <a href="javascript:;" onclick="modifyFile(6)">新增</a>
                        </td>
                        <td width="500">
                            @if(isset($files['drives']) && $files['drives'])
                                @foreach($files['drives'] as $drive)
                                    @if(file_exists(ltrim($drive,'/')))
                                        <div style="margin:5px;float:left;">
                                            <img src="{{$drive}}" height="100">
                                        </div>
                                    @endif
                                @endforeach
                            @endif
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2"><hr></td>
                    </tr>
                    </tbody>
                </table>
                <button type="button" class="am-btn am-btn-primary"
                        onclick="history.go(-1);">返回</button>
                <br><br><br>
            </div>
        </div>
    </div>





    {{--弹窗--}}
    @include('admin.member.staff.optionPop')
    @include('admin.member.staff.optionJs')
@stop